package com.fjut.zr.judge_system.VJ.Submitter;

import com.fjut.zr.judge_system.POJO.PO.TVjSubmitPO;

public class VJSubmitterImpl implements VJSubmitter {

    @Override
    public int doSubmit(TVjSubmitPO submitInfo) {
        System.out.println("==========提交信息==========");
        System.out.println("我方评测ID:"+submitInfo.getRid());
        System.out.println("目标OJ:"+vj_keys[submitInfo.getOjId()]);
        System.out.println("目标OJ题目ID:"+submitInfo.getPid());
        System.out.println("编程语言:"+submitInfo.getLanguage());
        System.out.println("提交的代码:"+submitInfo.getCode());
        System.out.println("===========================");
        submitInfo(submitInfo,submitInfo.getOjId());//提交信息
        return 0;
    }
    private void  submitInfo(TVjSubmitPO submitInfo,int OJId )
    {
        vjudge.addSubmit(submitInfo,OJId);
    }
}
